<template>
    <div class="guide-model123">
        <div class="guide-text" :class="{'guide-text-2': guideStep == 2, 'guide-text-3': guideStep == 3}">
            <p><span v-text="guideText"></span> <span v-text="greenFont"></span></p>
            <p @click="next()">我知道了</p>
            <div class="guide-arrow"></div>
        </div>
        <div class="guide-pointer" :class="{'guide-pointer-2': guideStep == 2, 'guide-pointer-3': guideStep == 3}"></div>
    </div>
</template>

<script>
export default {
    methods: {
        next () {
            console.log(this.guideStep);
            this.guideStep++;
            console.log(this.guideStep);
            if (this.guideStep == 1) {
                this.guideText = "行程中您也可以使用";
                this.greenFont = "鸣笛寻车";
            } else if (this.guideStep == 2) {
                this.guideText = "车辆临时停放时";
                this.greenFont = "锁闭车门";
            } else if (this.guideStep == 3) {
                this.guideText = "车辆临时停放时";
                this.greenFont = "解锁车门";
            } else if (this.guideStep == 4) {
                this.$emit("closeModel", true);
                this.guideStep = 1;
            }
        }
    },
    data () {
        return {
            guideStep: 1,

            guideText: "行程中您也可以使用",
            greenFont: "鸣笛寻车",
        }
    }
 }
</script>

<style scoped>
    .guide-model123 {
        position: relative;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.10);
    }
    .guide-text {
        position: absolute;
        left: 30px;
        bottom: 145px;
        width: 400px;
        height: 150px;
        padding: 0 25px 0 28px;

        background: #fff url(../../static/image/tag_attention.png) left top no-repeat;
        background-size: 44px 36px;

        box-shadow: 0 10px 20px 0 rgba(0,0,0,0.10);
        border-radius: 10px;

        display: -webkit-flex;
        display: -moz-flex;
        display: -ms-flex;
        display: -o-flex;
        display: flex;
        justify-content: space-around;
        align-items: center;

    }
    .guide-text-2 {
        left: 150px;
    }
    .guide-text-3 {
        left: 270px;
    }
    p {
        font-family: PingFangSC-Regular;
        font-size: 24px;
        color: #000;
        letter-spacing: 0;
        line-height: 33px;
    }
    p span:last-of-type {
        color: #0db95f;
    }
    p:last-of-type {
        width: 210px;
        height: 80px;
        margin-left: 24px;
        padding-left: 30px;
        padding-top: 27px;
        border-left: 2px solid #f5f5f5;
        font-family: PingFangSC-Regular;
        font-size: 26px;
        color: #0db95f;
        letter-spacing: 0;
    }
    .guide-arrow {
        position: absolute;
        left: 40px;
        bottom: -20px;
        z-index: 500;
        width: 0;
        height: 0;
        border-color: #fff transparent transparent transparent;
        border-style: solid;
        border-width: 10px;
    }
    .guide-pointer {
        position: absolute;
        left: 30px;
        bottom: 28px;
        background: #f5f5f5 url(../../static/image/icon_ring.png) center center no-repeat;
        background-size: 44px 36px;

        width: 100px;
        height: 100px;
        border-radius: 50px;
    }
    .guide-model123 .guide-pointer-2 {
        position: absolute;
        left: 153px;
        bottom: 28px;
        background: #f5f5f5 url(../../static/image/icon_lock.png) center center no-repeat;
        background-size: 44px 36px;

        width: 100px;
        height: 100px;
        border-radius: 50px;
    }
    .guide-model123 .guide-pointer-3 {
        position: absolute;
        left: 276px;
        bottom: 28px;
        background: #f5f5f5 url(../../static/image/icon_unlock.png) center center no-repeat;
        background-size: 44px 36px;

        width: 100px;
        height: 100px;
        border-radius: 50px;
    }
</style>
